<?php
require_once('config.inc.php');
if(isset($checklogin) && $checklogin==1) {
	$login = Login::getInstance();
	$login->init("users");
	if($login->isLogin()==false)
		header("location: login.php");
}
?>
<html>
<head>
<title><?=$site_name; ?></title>
</head>
<body>
<h1><?=$site_name; ?></h1>
<?php
if(isset($login) && $login->isLogin()) {
 echo "<p>Je bent ingelogd als ".$login->getUsername()." - <a href=\"logout.php\">uitloggen</a></p>";
}
?>